I am trying to write a gui that allows someone to hit a start, stop and pause button to record the amount of time the module is open and being edited. Ideally we keep our test in doors with a test header. So while I can make a GUI for ways the user to enter their name I want them to be able to hit Start when they start the test to go through the test to edit attributes, pause for interruptions, and stop when at the end of the test. I Want this time saved in the text field at the top of the test(our "test header". Any suggestions? I know how to script a gui, save input in text boxes as strings etc. but now how to get this into a text box at the top of the test under the object text attribute. |
Re: Running A test /* $FILENAME: Module has incoming StartTest.dxl $VERSION: 0.1 $DATE_MODIFIED: 2012.02.29 $DESCRIPTION: Script to be Run to take a test $Change History: 2012.02.29: Initial Release by Jessica Lewis */ DB db = null DBE dbeClock = null DBE dbeTime = null DBE dbeStart = null DBE dbeStop = null int interval = 1 // CB on timer updates display void doClock(DBE dbe) { string s1 = stringOf(dateAndTime(today)) set(dbeTime, s1) } // start the clock void doStart(DB db) { if (startTimer(dbeClock)) { inactive(dbeStart) active(dbeStop) } } // stop the clock void doStop(DB db) { if (stopTimer(dbeClock)) { active(dbeStart) inactive(dbeStop) } } db = create(dbExplorer, "Test Portal", styleCentered) dbeTime = field(db, "Current time", "", 20, true) // create the timer. dbeClock = timer(db, interval, doClock, "") dbeStart = apply(db, "Start", doStart) dbeStop = apply(db, "Stop", doStop) realize db setCenteredSize(db, 250, 100) inactive(dbeStart) show db Ok So far I have gotten the start stop feature to display on that actual time but every time i try to pass a null number into the argument above i get syntax errors. So i need to start the clock at zero and not the current time and find a way to save the header info above in the object text box in the previous post. |
Re: Running A test
The timer function referenced above is not documented in the DOORS DXL Reference Manual. I've asked IBM to provide documentation and they declined. I've submitted an RFE to ask IBM to add the timer function to the DXL Reference Manual. Please vote on the proposed RFE at http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=39914. |